﻿
@{
    ViewBag.Title = "Đăng ký nhóm";
    Layout = "~/Views/Shared/_Master.cshtml";
    System.Collections.IList listGroup = (System.Collections.IList)TanWeb.Helpers.Utils.GetSession(TanWeb.Helpers.Constants.SS_LISTMENUITEM);
    System.Collections.IList listSubGroup = (System.Collections.IList)TanWeb.Helpers.Utils.GetSession(TanWeb.Helpers.Constants.SS_LISTSUBMENUITEM);
}

<script src="@Url.Content("~/Scripts/Common/script.js")" type="text/javascript"></script>
@Scripts.Render("~/Scripts/Pages/new_group.js")
@Scripts.Render("~/Scripts/Common/modalPopup.js")

<div class="masterPage">
    <div class="box_center">
        <div class="div_action">
            <div>
                <input type="button" id="btnAddSubGroup" class="button disabled width-150" value="Thêm nhóm con" disabled="disabled" />
            </div>
            <div>
                <input type="button" id="btnAddGroup" class="button width-150" value="Thêm nhóm cha" />
            </div>
            <div>
                <input type="button" id="btnDelete" class="button disabled width-100" value="Xóa" disabled="disabled" />
            </div>
            <div>
                <input type="button" id="btnBack" class="button width-100" value="Quay về" />
            </div>
        </div>
    </div>
    <div class="box_center">
        <span>Nhóm cha</span>
        <select id="cboGroup" name="groupId">
            <option value="0">Chọn nhóm cha</option>
            @foreach (TanWeb.Models.Entities.ItemGroup item in listGroup)
            {
                <option value="@item.id">@item.GroupName</option>
            }
        </select>
    </div>
    <div class="box_center info">
        <table>
            <thead>
                <tr>
                    <th class="width-20">&nbsp;</th>
                    <th>Tên nhóm con</th>
                </tr>
            </thead>
            <tbody>
                @{ 
                    if (listSubGroup.Count == 0) 
                    {
                        <tr><td colspan="2">@TanWeb.Helpers.Constants.GRID_EMPTY_WARNING</td></tr>
                    }
                    else
                    {
                        foreach (TanWeb.Models.Entities.SubItemGroup item in listSubGroup)
                        {
                            <tr>
                                <td class="width-20"><input type="checkbox" name="chkDel" class="checkbox" subId="@item.id" groupId="@item.GroupId" /></td>
                                <td><a href="#" class="groupname" id="@item.id">@item.SubGroupName</a></td>
                            </tr>
                        }
                    }
                }
            </tbody>
        </table>
    </div>
    <input type="hidden" id="goBack" value="@ViewBag.goBack" />
</div>
